home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / tcp / SLIPScripts1_3.lha / SLIPResume.rexx next >
OS/2 REXX Batch file  |  1995-02-03  |  2KB  |  41 lines

  1. /* SLIPResume.rexx  ver 1.3 Feb. 3, 1995   by Travis Pascoe               */
  2. /*                                         pasc8891@raven.csrv.uidaho.edu */
  3. /*                                                                        */
  4. /*   SLIPResume is an ARexx script used to restart AmiTCP slip using      */
  5. /*   the previous slip IP stored in ENVARC:oldip.  In order to use        */
  6. /*   this script you MUST still have a modem connection with your         */
  7. /*   dialup service.  This can occur, for example, if you have just       */
  8. /*   rebooted your computer but your modem has maintained carrier (you    */
  9. /*   can ensure this if you set ignore DTR on your modem).                */
  10. /*                                                                        */
  11. /*   Requirements:   ARexx   (obviously)                                  */
  12. /*                   AmiTCP ver 3.0b+                                     */
  13. /*                   previous IP address stored in ENVARC:oldip           */
  14. /*                   and an existing connection to your SLIP provider     */
  15. /*                                                                        */
  16. /*   Usage:          From a cli, type:    rx slipresume                   */
  17. /*                                                                        */
  18. /*   Warning:        You WILL need to modify the script in several        */
  19. /*                   places to suit your host dialup settings.            */
  20. /*                   Follow the comments below for assistance.            */
  21.  
  22.   if exists('ENVARC:oldip') then do  
  23.     address command
  24.     'copy ENVARC:oldip ENV:ip'
  25.     'echo "Attempting to resume SLIP with address:  $ip"'
  26.     /* I use cslip and 38400 modem-computer speed, change as desired  */
  27.     'echo >ENV:sana2/rhcslip0.config "serial.device 0 38400 $ip"'
  28.     /* change hostname and alias as desired                           */
  29.     'echo >AmiTCP:db/netdb-myhost "HOST $ip me.mydomain.edu me"'
  30.     /* change domain as needed                                        */
  31.     'echo >>AmiTCP:db/netdb-myhost "DOMAIN 129.123.45.6"'
  32.     /* change nameserver as needed                                    */
  33.     'echo >>AmiTCP:db/netdb-myhost "NAMESERVER 129.123.123.4"'
  34.     'startnet'
  35.     end
  36.   else do
  37.     say 'Unable to resume SLIP.'
  38.     end
  39.     
  40. exit 0
  41.